package com.mtr.databoard.domain.screens;
import com.mtr.databoard.domain.Entity;
import com.mtr.databoard.domain.middlewares.Parameter;

import java.util.List;
import java.util.UUID;

public class ScreenMiddleware extends Entity<UUID> {
    private String name;
    private String description;
    private ScreenResource middleware;
    private String middlewareEntry;
    private long updateFrequency;
    private List<Parameter> parameters;
    private boolean isPush;
    private  boolean isSystemMiddleware;
    private UUID systemMiddlewareId;

    public ScreenMiddleware() {
        this.setId(UUID.randomUUID());
    }

    public ScreenMiddleware(String name, String description, ScreenResource middleware, String middlewareEntry, long updateFrequency, List<Parameter> parameters, boolean isPush, boolean isSystemMiddleware, UUID systemMiddlewareId) {
        this.name = name;
        this.description = description;
        this.middleware = middleware;
        this.middlewareEntry = middlewareEntry;
        this.updateFrequency = updateFrequency;
        this.parameters = parameters;
        this.isPush = isPush;
        this.isSystemMiddleware = isSystemMiddleware;
        this.systemMiddlewareId = systemMiddlewareId;
        this.setId(UUID.randomUUID());
    }

    public UUID getSystemMiddlewareId() {
        return systemMiddlewareId;
    }

    public void setSystemMiddlewareId(UUID systemMiddlewareId) {
        this.systemMiddlewareId = systemMiddlewareId;
    }

    public boolean isSystemMiddleware() {
        return isSystemMiddleware;
    }

    public void setSystemMiddleware(boolean systemMiddleware) {
        isSystemMiddleware = systemMiddleware;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public ScreenResource getMiddleware() {
        return middleware;
    }

    public void setMiddleware(ScreenResource middleware) {
        this.middleware = middleware;
    }

    public String getMiddlewareEntry() {
        return middlewareEntry;
    }

    public void setMiddlewareEntry(String middlewareEntry) {
        this.middlewareEntry = middlewareEntry;
    }

    public long getUpdateFrequency() {
        return updateFrequency;
    }

    public void setUpdateFrequency(long updateFrequency) {
        this.updateFrequency = updateFrequency;
    }

    public List<Parameter> getParameters() {
        return parameters;
    }

    public void setParameters(List<Parameter> parameters) {
        this.parameters = parameters;
    }

    public boolean isPush() {
        return isPush;
    }

    public void setPush(boolean push) {
        isPush = push;
    }
}
